package net.mingsoft.basic.entity;

import net.mingsoft.base.entity.*;
import com.baomidou.mybatisplus.annotation.*;
import org.apache.commons.lang3.*;

@TableName("manager")
public class ManagerEntity extends BaseEntity
{
    private String managerName;
    @TableField("MANAGER_NICKNAME")
    private String managerNickName;
    @TableField(exist = false)
    private String roleName;
    @TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
    private String managerPassword;
    private String managerAdmin;
    private String roleIds;
    private Integer del;
    
    public ManagerEntity() {
        this.managerAdmin = "";
    }
    
    public String getRoleName() {
        return this.roleName;
    }
    
    public String getManagerAdmin() {
        return (this.managerAdmin == null) ? "" : this.managerAdmin;
    }
    
    public void setManagerAdmin(String managerAdmin) {
        if (managerAdmin == null) {
            managerAdmin = "";
        }
        this.managerAdmin = managerAdmin;
    }
    
    public void setRoleName(final String roleName) {
        this.roleName = roleName;
    }
    
    public String getManagerName() {
        return this.managerName;
    }
    
    public void setManagerName(final String managerName) {
        this.managerName = managerName;
    }
    
    public String getManagerPassword() {
        return this.managerPassword;
    }
    
    public void setManagerPassword(final String managerPassword) {
        this.managerPassword = managerPassword;
    }
    
    public String getManagerNickName() {
        return this.managerNickName;
    }
    
    public void setManagerNickName(final String managerNickName) {
        this.managerNickName = managerNickName;
    }
    
    public String getRoleIds() {
        return this.roleIds;
    }
    
    public void setRoleIds(final String roleIds) {
        this.roleIds = roleIds;
    }
    
    public int getRoleId() {
        if (StringUtils.isNotBlank((CharSequence)this.roleIds)) {
            return Integer.parseInt(this.roleIds.split(",")[0]);
        }
        return 0;
    }
    
    public void setRoleId(final int roleId) {
        this.roleIds = String.valueOf(roleId);
    }
    
    public void setRoleNames(final String roleName) {
        this.roleName = roleName;
    }
    
    public String getRoleNames() {
        return this.roleName;
    }
}
